﻿@model SmsSettings
@{
    Layout = "_ControlPanel";
}
<div class="tn-block tnc-ctnborder" id="all">
    <div class="tnc-main">
        <div class="tnc-ctn-center">
            <h1 style="border-bottom: 0px">
                <span>短信设置</span>
            </h1>
            <div class="tn-tabs">
                <ul class="tn-tabs-nav tn-border-gray tn-border-bottom tn-helper-clearfix">
                    <li class="tn-widget-content tn-border-gray tn-border-trl">
                        <a href="@SiteUrls.Instance().ManageSms()">
                            短信模版列表
                        </a>
                    </li>
                    <li class="tn-widget-content tn-border-gray tn-border-trl tn-tabs-selected">
                        <a href="@SiteUrls.Instance().SmsSettings()">
                            短信设置
                        </a>
                    </li>
                </ul>
            </div>
            @using (Html.BeginAjaxForm("SmsSettings", "ControlPanelSettings", FormMethod.Post, new AjaxFormOptions().SetOnSuccessCallBack("ManageEmailOtherSettingsSuccessCallBack")))
            {
                <div class="tnc-ctnright-list">
                    <div class="tn-form-box">
                        <table>
                            <tbody>
                                <tr class="tunr-succeed">
                                    <th>
                                        短信账号用户名：
                                    </th>
                                    <td>
                                        @Html.TextBoxFor(n => n.UserName, new { @class = "tn-textbox tn-input-long tn-border-gray" })
                                        @Html.ValidationMessageFor(n => n.UserName)
                                    </td>
                                    <td></td>
                                </tr>
                                <tr class="tunr-succeed">
                                    <th>
                                        短信密码：
                                    </th>
                                    <td>
                                        @Html.TextBoxFor(n => n.PassWord, new { @class = "tn-textbox tn-input-long tn-border-gray" })
                                        @Html.ValidationMessageFor(n => n.PassWord)
                                    </td>
                                    <td></td>
                                </tr>
                                <tr class="tunr-succeed">
                                    <th>
                                        短信地址：
                                    </th>
                                    <td>
                                        @Html.TextBoxFor(n => n.UserSmslAddress, new { @class = "tn-textbox tn-input-long tn-border-gray" })
                                        @Html.ValidationMessageFor(n => n.UserSmslAddress)
                                    </td>
                                    <td></td>
                                </tr>
                                <tr class="tunr-succeed">
                                    <th>
                                        短信平台：
                                    </th>
                                    <td>
                                        @Html.TextBoxFor(n => n.SmsName, new { @class = "tn-textbox tn-input-long tn-border-gray" })
                                        @Html.ValidationMessageFor(n => n.SmsName)
                                    </td>
                                    <td></td>
                                </tr>
                                <tr class="tunr-Submit">
                                    <th>
                                    </th>
                                    <td>
                                        @Html.Button("提交", ButtonTypes.Submit, HighlightStyles.Primary, ButtonSizes.Default, null, TextIconLayout.IconText, htmlAttributes: new { id = "submit" })
                                    </td>
                                    <td></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            }
        </div>
    </div>
</div>
<script type="text/javascript" language="javascript">
    function ManageEmailOtherSettingsSuccessCallBack(data) {
        art.dialog.tips(data.MessageContent, 1.5, data.MessageType, function () { window.location.reload(true); });
    }
</script>
